var e = require("../../wxSearch/wxSearch.js");

Page({
    data: {},
    onLoad: function(a) {
        var r = this;
        r.setData({
            types: a.types
        }), e.init(r, [ "杭州", "嘉兴", "海宁", "桐乡", "宁波", "金华", "绍兴", "上海", "苏州", "无锡", "常州", "南京", "济南", "长沙", "北京", "广州", "厦门", "香港", "澳门", "深圳" ], [ "杭州", "嘉兴", "海宁", "桐乡", "宁波", "金华", "绍兴", "上海", "苏州", "无锡", "常州", "南京", "济南", "长沙", "北京", "广州", "厦门", "香港", "澳门", "深圳" ], r.mySearchFunction, r.myGobackFunction);
    },
    wxSearchInput: e.wxSearchInput,
    wxSearchKeyTap: e.wxSearchKeyTap,
    wxSearchDeleteAll: e.wxSearchDeleteAll,
    wxSearchConfirm: e.wxSearchConfirm,
    wxSearchClear: e.wxSearchClear,
    mySearchFunction: function(e) {
        var a = this.data.types;
        wx.redirectTo({
            url: "../youhui?searchValue=" + e + "&&types=" + a
        });
    },
    myGobackFunction: function() {
        1 == this.data.types ? wx.switchTab({
            url: "../../home"
        }) : wx.redirectTo({
            url: "../youhui"
        });
    }
});